<template>
  <div class="public_height100 p20 pub_bgColorFFF">
    <div class="table_content">
      <!-- ====== 表格上方的筛选条件 start ======-->
      <div class="table_filter flex_space_between">
        <div class="flex_start ">
          <div class="table_filter_search">
            <el-input v-model="params.content" class="pub_input pub_input_search" placeholder="搜索内容" clearable @keydown.enter.native="handleSearch" @clear="handleSearch">
              <img slot="prefix" src="@/assets/img/orderManagement/search.png" class="pub_imgSize16" />
            </el-input>
          </div>
          <div class="table_filter_search ml12">
            <el-button type="text" class="public_confirm_btn pub_button" @click="handleSearch"> 搜索 </el-button>
          </div>
        </div>
      </div>
      <!-- ====== 表格上方的筛选条件 end ======-->
      <el-table ref="multipleTable" size="mini" :data="tableData" tooltip-effect="dark" border :height="`${536 * $f}px`" class="wp100 mt12" @selection-change="handleSelectionChange">
        <el-table-column label="反馈用户" show-overflow-tooltip prop="username" align="center" />
        <el-table-column label="反馈时间" show-overflow-tooltip prop="commitTime" align="center" />
        <el-table-column label="反馈内容" show-overflow-tooltip prop="content" align="center" />
        <el-table-column label="联系方式" show-overflow-tooltip prop="contact" align="center" />
      </el-table>
      <div class="pub_pageination flex_center mt18">
        <el-pagination background :page-size="params.pageSize" :current-page.sync="params.pageNum" layout="total,prev, pager, next,sizes" :total="params.total" @current-change="changePage" @size-change="changeSize" />
      </div>
    </div>
  </div>
</template>
<script>
import tableFun from '@/mixin/tableFun.js';
export default {
  mixins: [tableFun],
  data() {
    return {
      tableData: [],
      params: { total: 0, pageSize: 20, pageNum: 1, content: '' }
    };
  },
  created() {
    this.getDataList();
  },
  methods: {
    //获取表格数据
    async getDataList() {
      this.tableData = [];
      let res = await this.$api.get(this.$url.feedbackPageList, this.params);
      this.tableData = res.rows;
      this.params.total = res.total;
    }
  }
};
</script>
<style lang="less" scoped>
.feedbackList {
  width: 100%;
  overflow: hidden;
  .table_content,
  .echarts {
    background: #ffffff;
    border-radius: 16px 16px 16px 16px;
    padding: 20px;
    box-sizing: border-box;
  }
  .table_content {
    width: 100%;
  }
  .table_filter_search {
    width: 200px;
  }
}
.addOrder {
  .el-form-item {
    margin-bottom: 0px;
  }
}
</style>
